package com.jyb.qiyefuwu.view.activity;


import android.view.View;

import androidx.fragment.app.Fragment;
import androidx.lifecycle.ViewModelProvider;

import com.alibaba.android.arouter.facade.annotation.Route;
import com.jyb.qiyefuwu.R;
import com.jyb.qiyefuwu.databinding.ActivityServiceBinding;
import com.jyb.qiyefuwu.router.PathHome;
import com.jyb.qiyefuwu.viewmodel.ServiceTypeModel;
import com.sgb.link.router.PathEnterpriseServices;
import com.swgk.core.common.base.BaseActivity;
import com.swgk.core.common.utils.ActivityJump;

import java.util.ArrayList;

@Route(path = PathHome.ServiceActivity)
public class ServiceActivity extends BaseActivity<ServiceTypeModel, ActivityServiceBinding> {
    private ArrayList<Fragment> mFragments = new ArrayList<>();

    @Override
    protected int layoutId() {
        return R.layout.activity_service;
    }

    @Override
    protected void createViewModel() {
        mViewModel = new ViewModelProvider(this).get(ServiceTypeModel.class);
    }

    @Override
    protected void init() {
       mBinding.open.setOnClickListener(new View.OnClickListener() {
           @Override
           public void onClick(View v) {
               ActivityJump.startActivity(PathHome.ServiceTestActivity);
           }
       });
        mBinding.openOder.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View v) {
                ActivityJump.startActivity(PathEnterpriseServices.SalesOrderDetailsActivity);
            }
        });
    }
}
